#pragma once
#include <string>
#include <map>
#include "../IRenderData.h"
#include "../Uniform.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLVertexArrayObject.h"
#include "OpenGLBuffer.h"
POCELAIN_NAMESPACE_BEGIN
class OpenGLMaterialRenderData : public IRenderData
{
public:
    OpenGLMaterialRenderData();
    virtual ~OpenGLMaterialRenderData();
    std::string mVertShaderSource;
    std::string mFragShaderSource;
    std::string mTessShaderSource;
    std::string mGeomShaderSource;

    OpenGLShaderProgram *getProgram() const { return mProgram ; }
    void setProgram(OpenGLShaderProgram *val);

    const std::map<GLint,IUniform*> &getLocationUniformMap()const{return mMapLocationUniform;}
    void addUniform(GLint location ,IUniform *uniform);
    void clearUniforms();

private:
    OpenGLShaderProgram *mProgram = nullptr;
    std::map<GLint,IUniform*> mMapLocationUniform;
};

class OpenGLGeometryRenderData : public IRenderData
{
public:
    OpenGLGeometryRenderData();
    virtual ~OpenGLGeometryRenderData();
    std::map<std::string,RefPtr<OpenGLBuffer>> mMapNameBuffer;
    std::map<std::string,EUniformType> mMapNameType;

    OpenGLBuffer *mEBO = nullptr;
};
POCELAIN_NAMESPACE_END
